/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufba.lasid.v1.jitclouds.mda.datatypes.virtualization;

import br.ufba.lasid.v1.jitclouds.mda.datatypes.IConfiguration;

/**
 *
 * @author aliriosa
 */
public class BasicVirtualMachine implements IVirtualMachine{
    
    private IConfiguration configuration = null;
   
    private String idMachine = null;
    private String descMachine = null;
    private IHypervisor hypervisor = null;
    private VMStatus status;
    
    @Override
    public String getID() {
        return idMachine;
    }

    @Override
    public void setID(String idMachine) {
        this.idMachine = idMachine;
    }

    @Override
    public IConfiguration getConfiguration() {
        return configuration;
    }
    
    @Override
    public String getDescription() {
        return this.descMachine;
    }

    @Override
    public void setDescription(String description) {
        this.descMachine = description;
    }
    
    @Override
    public void execute(String command) {
        //do nothing
    }

    @Override
    public void setConfiguration(IConfiguration config) {
        this.configuration = config;
    }

    @Override
    public IHypervisor getHypervisor() {
        return this.hypervisor;
    }

    @Override
    public void setHypervisor(IHypervisor hypervisor) {
        this.hypervisor = hypervisor;
    }

    @Override
    public void shutdown() {
        execute("shutdown");
    }

    @Override
    public void startup() {
        execute("startup");
    }

    @Override
    public void pause() {
        execute("pause");
    }

    @Override
    public void reboot() {
        execute("reboot");
    }

    @Override
    public void setStatus(VMStatus status) {
        this.status = status;
    }

    @Override
    public VMStatus getStatus() {
        return this.status;
    }

    public void destroy() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
